package com.xinqi.modules.discuss.notice.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.discuss.notice.domain.CourseNoticeEntity;
import com.xinqi.modules.discuss.notice.dto.req.CourseNoticeCreateDTO;
import com.xinqi.modules.discuss.notice.dto.req.CourseNoticeUpdateDTO;
import com.xinqi.modules.discuss.notice.dto.rsp.CourseNoticeResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

/**
 * 课程公告主表转换
 *
 * @author: yyzhen
 * @date: 2023/03/21
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class CourseNoticeConvert {

    public abstract CourseNoticeEntity create(CourseNoticeCreateDTO s);

    public abstract CourseNoticeEntity newEntity(CourseNoticeEntity s);

    public abstract CourseNoticeEntity update(CourseNoticeUpdateDTO s, @MappingTarget CourseNoticeEntity t);

    public abstract CourseNoticeEntity update(CourseNoticeUpdateDTO s);

    public abstract CourseNoticeResultDTO convert(CourseNoticeEntity s);
}
